package com.example.jeelw.business.test.kafka.controller;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@RequestMapping(value = "myConsumer")
public class MyConsumer {

	@KafkaListener(topics="mytopic")
	public void listen(ConsumerRecord<?, String> recod) {
		String value = recod.value();
		System.out.println(value);
		System.out.println(recod);
	}
}
